<script setup>
import baseModel from "@/components/baseModel/baseModel.vue";
import { computed, onMounted, reactive, ref, nextTick, watch } from "vue";

import { message } from "ant-design-vue";

import {} from "@ant-design/icons-vue";

const dialog = ref(null);

const emit = defineEmits(["timerOver"]);

const props = defineProps({
  // 总数
  totalUploadNum: {
    type: Number,
    default:0
  },
  // 已完成的数量
  accomplishNum: {
    type: Number,
    default:0
  },
  // 勾选的总组数
  checkNumber: {
    type: Number,
    default:0
  },

})

const waitNum = computed(() => {
  return props.totalUploadNum - props.accomplishNum
})

const closeModal = () => {
  dialog.value.closeModal();
};

const showModal = () => {
  dialog.value.showModal();
};



defineExpose({
  showModal,
  closeModal,
});
</script>

<template>
  <div class="audition">
    <!-- 
      :title="null"
     -->
    <baseModel
      ref="dialog"
      :contentWidth="'554px'"
      minWidth="554px"
      :zIndex="9999"
      :getContainer="() => document.queryselector('.audition')"
      :closable="false"
      :maskClosable="false"
    >
      <template #title> <div></div></template>
      <template #content>
        <div class="content">
          <img src="@/common/image/circleLoading.gif" class="title_img" alt="" />
          <p>图片正在保存中, 请稍候...</p>
          <span style="color: #0c0d0e; font-weight: bold;">正在保存图片，请不要关闭或刷新页面......</span>
          <div>
            <span>
              已选: <span class="msg_num">{{ props.checkNumber }}个图集组</span> 
            </span>
            <span>
              上传总数: <span class="msg_num">{{ props.totalUploadNum }}</span> 
            </span>
            <span>
              已完成数: <span class="msg_num">{{ props.accomplishNum }}</span>  
            </span>
            <span>
              待上传数: <span class="msg_num">{{ waitNum }}</span> 
            </span>
          </div>
        </div>
      </template>
      <template #footer>
        <span></span>
        <!-- <div class="bottom" >
          <a-button class="btn" key="submit" type="primary" @click="closeModal"
            >我知道啦({{ overTime }}s)</a-button
          >
        </div> -->
      </template>
    </baseModel>
  </div>
</template>

<style lang="less" scoped>
.title_box {
  span {
    font-size: 18px;
    color: #0c0d0e;
  }
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;

  .loding {
    margin-top: 50px;
  }

  .title_img {
    width: 120px;
    height: 120px;
    object-fit: contain;
  }

  p {
    font-weight: 600;
    font-size: 16px;
  }

  span {
    color: #888;
  }

  .msg_num{
    color: #0c0d0e;
    font-weight: bold;
  }

}

.bottom {
  display: flex;

  .btn {
    margin-left: auto;
  }
}
</style>
